<template>
    <div id="outbound">
        <v-navMenu
                :detailNav="detailNav"
                :menuData="menuData"
                @setMentActive="setMentActive"
        ></v-navMenu>
        <component :is="currentComponent"></component>
    </div>
</template>

<script>
    import navMenu from "commons/NavMenu";
    import bus from "../../../../bus/bus";

    export default {
        name: "outbound",
        data() {
            return {
                detailNav: "1",
                menuData: [
                    {label: this.$t('home.efficiency'), index: "1"},
                ],
                componentConfig: [
                    {
                        name: "efficiency",
                        label: this.$t('home.efficiency'),
                        component: () => import('./page/efficiencyComponent.vue')
                    }
                ],
                type: "0",
            }
        },
        computed: {
            currentComponent() {
                return this.componentConfig[this.detailNav - 1].component;
            }
        },
        methods: {
            setMentActive(key, data) {
                // this.detailNav = key;
                if (key == "1") {
                    this.type = "0";
                } else if (key == "2") {
                    this.type = "5";
                } else if (key == "3") {
                    this.type = "9";
                } else if (key == "4") {
                    this.type = "11";
                } else if (key == "5") {
                    this.type = "15";
                }
            },
        },
        mounted() {

        },
        components: {
            "v-navMenu": navMenu
        }
    }
</script>

<style scoped>
</style>
